#!/usr/bin/env python3
# -*- coding: utf-8 -*-

class Student(object):
    """docstring for Student."""
    def __init__(self, name):
        self.__name = name
    def __str__(self):
        return 'Student object(name:%s)'% self.__name
    __repr = __str__
    def __call__(self):
        print("in call")
s = Student('Wangkaixuan')
print(s)
s()

class Fib(object):
    """docstring for Fib."""
    def __init__(self):
        self.a,self.b = 0,1
    def __iter__(self):
        return self
    def __next__(self):
        self.a,self.b = self.b,self.a + self.b
        if self.a > 100:
            raise StopIteration()
        return self.a
for value in Fib():
    print(value)
